#include <stdio.h>
#include <stdlib.h>
int main()
{
	int *p = (int *)malloc(sizeof(int) * 10);
	int i = 0;
	for(i = 0; i < 10; i++)
	{
		p[i] = i;
		printf("%d ", p[i]);
	}
	int* ptr = (int *)realloc(p+5, sizeof(int) * 10);
	if(ptr != NULL)
	{
		p = ptr;
	}
	for(i = 0; i < 15; i++)
	{
		p[i] = i;
		printf("\n");
		printf("%d ", p[i]);
	}
	return 0;
} 
